﻿#ifndef PROGRESSINFO_H
#define PROGRESSINFO_H

#include <QObject>

class ProgressInfo : public QObject
{
    Q_OBJECT
public:
    explicit ProgressInfo(QObject *parent = nullptr);
    ProgressInfo(const ProgressInfo &other);
    ProgressInfo& operator=(const ProgressInfo &other);
    ~ProgressInfo();
    void clear();

    bool getEnabled() const;
    void setEnabled(bool value);

    uint64_t getRunTime() const;
    void setRunTime(const uint64_t &value);

    float getCpuUsage() const;
    void setCpuUsage(float value);

    uint64_t getMemory() const;
    void setMemory(const uint64_t &value);

    uint64_t getVirtualMemory() const;
    void setVirtualMemory(const uint64_t &value);

    uint64_t getIoRead() const;
    void setIoRead(const uint64_t &value);

    uint64_t getIoWrite() const;
    void setIoWrite(const uint64_t &value);

    QString getStateMsg() const;
    void setStateMsg(const QString &value);

private:
    bool enabled;//是否启动
    QString stateMsg;//运行信息
    uint64_t runTime;//运行时长（s）
    float cpuUsage;//cpu占用率
    uint64_t memory;//内存
    uint64_t virtualMemory;//虚拟内存
    uint64_t ioRead;//io读
    uint64_t ioWrite;//io写
};

#endif // PROGRESSINFO_H
